using cfg;
using cfg.grade;
using SimpleJSON;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;

namespace FrameWork
{
    public class ConfigModule : BaseModule
    {
        private string _gameConfDir = $"{Application.dataPath}/Table/Data/";

        private Tables _tables;

        public override void Init()
        {
            _tables = new Tables(file =>
               JSON.Parse(File.ReadAllText(_gameConfDir + file + ".json")
            ));
        }

        public override void ShutDown()
        {
            
        }

        public override void Update(float deltaTime, float realDeltaTime)
        {
            
        }

        private void InitTableDir()
        {
            var students = _tables.TbStudent;
            Student student = students.Get(1);
            Debug.Log(student.Name);
        }
    }
}

